﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DSS_XNA.Engine.World.Worlds.RPGWorld;

namespace TileMapEditor
{
    public partial class frmTileProperties : Form
    {
        #region Properties

        public bool IsCollidable
        {
            get { return _isCollidable; }
            set { _isCollidable = value; }
        }
        private bool _isCollidable = false;

        public frmRPGMapEditor RpgEditor
        {
            get { return _rpgEditor; }
            set { _rpgEditor = value; }
        }
        private frmRPGMapEditor _rpgEditor = null;

        public Tile SelectedTile
        {
            get { return _selectedTile; }
            set { _selectedTile = value; }
        }
        private Tile _selectedTile = null;

        #endregion

        public frmTileProperties(frmRPGMapEditor rpgEditor)
        {
            InitializeComponent();

            this.RpgEditor = rpgEditor;
        }

        private void frmTileProperties_Load(object sender, EventArgs e)
        {
            this.checkIsCollidable.Checked = this.RpgEditor.TileMap.TileProperties[this.RpgEditor.RightClickTileIdx].IsCollidable;
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.IsCollidable = this.checkIsCollidable.Checked;
        }
    }
}
